//
//  ImageView.m
//  BeautyPicture
//
//  Created by LiuNa on 16/3/1.
//  Copyright © 2016年 szb. All rights reserved.
//

#import "ImageView.h"

@implementation ImageView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        self.im = [[UIImageView alloc] init];
        [self addSubview:self.im];
        
        self.lab = [[UILabel alloc] init];
        [self addSubview:self.lab];
        
        
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    CGFloat imageViewGap = 10.0f;
    
    self.im.frame = CGRectMake(imageViewGap / 2.0, imageViewGap / 2.0, self.width - imageViewGap, self.height - imageViewGap);
    self.lab.frame = CGRectMake(0, 40, self.width - imageViewGap, 20);
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
